using FPLibrary;
using UnityEngine;

namespace PathX
{
    /// <summary>
    /// 测试角色
    /// </summary>
    public class UnitEntity : MonoBehaviour, IUnitProperties,IPathFinderOptions
    {
        [SerializeField]
        private Fix64 _radius;
        [SerializeField]
        private Vector3 _position;
        [SerializeField]
        private Fix64 _height;
        [SerializeField]
        private float _groundOffset;
        [SerializeField]
        private LayerMask _mask;
        [SerializeField,Tooltip("静止对角线移动")]
        private bool _preventDiagonalMoves;

        public FPVector position => FPVector.zero;//transform.position;
        public AttributeMask attributes => _mask.value;
        public Fix64 radius => _radius;
        public Fix64 groundOffset => _groundOffset;
        public int pathingPriority { get; set; } = 100;
        public int maxEscapeCellDistanceIfOriginBlocked { get; set; } = 10;
        public bool usePathSmoothing { get; set; }
        public bool preventDiagonalMoves
        {
            get { return _preventDiagonalMoves; }
            set { _preventDiagonalMoves = value; }
        }
        public bool navigateToNearestIfBlocked { get; set; } = true;
    }
}